//
//  ListCell.swift
//  SelfArtistry
//
//  Created by panda on 17/3/21.
//  Copyright © 2017年 panda. All rights reserved.
//

import UIKit
import SnapKit

class ListCell: UITableViewCell {

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        contentView.addSubview(titleLbl)
//        contentView.backgroundColor = UIColor.cyan
        
        titleLbl.snp.makeConstraints { (make) in
            make.top.equalTo(self.contentView).offset(10)
            make.width.equalTo(40)
            make.left.equalTo(20)
            make.top.equalTo(self.contentView).offset(10)
        }
        
        contentView.snp.makeConstraints { (make) -> Void in
            make.width.equalTo(self)
            make.height.equalTo(self)
            make.top.equalTo(self)
            make.bottom.equalTo(titleLbl.snp.bottom).offset(10)
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    lazy var titleLbl : UILabel = {
        let lbl = UILabel()
        lbl.numberOfLines = 0
        lbl.isUserInteractionEnabled = true
//        lbl.backgroundColor = UIColor.gray
        return lbl
    }()

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
